<!--

    Copyright (c) 2012, Mayocat <hello@mayocat.org>

    This Source Code Form is subject to the terms of the Mozilla Public
    License, v. 2.0. If a copy of the MPL was not distributed with this
    file, You can obtain one at http://mozilla.org/MPL/2.0/.

-->
<!-- list -->
<div id="list" ng-controller="ArticlesController">

    <div class="header">
        <h2>{{'content.title.allArticles' | translate}}</h2>
    </div>

    <!-- list pages -->
    <scroll>
        <ul class="list">
            <li ng-repeat="article in articles" ng-class="{active: entity.slug == article.slug && entity.type == 'article'}">
                <div>
                    <div class="droptarget">
                        <div><a ng-click="setRoute('/news/' + article.slug)">{{article.title}}</a></div>
                    </div>
                </div>
            </li>
        </ul>
    </scroll>

</div>

<!-- Deletion modal for articles -->
<script type="text/ng-template" id="confirmDeletionArticle.html">
    <div class="modal-header">
        <button type="button" class="close" ng-click="$dismiss()">&times;</button>
        <h3>{{'entity.title.confirmDeletion' | translate}}</h3>
    </div>
    <div class="modal-body">
        {{'content.alert.confirmArticleDeletion' | translate}}
    </div>
    <div class="modal-footer">
        <button class="btn" ng-click="$dismiss()">
            {{'entity.action.cancel' | translate}}
        </button>
        <button class="btn btn-danger" ng-click="$close()">
            {{'content.action.deleteArticle' | translate}}
        </button>
    </div>
</script>
